{% include file="index.header.tpl.php" %}
{% include file="index.left.tpl.php" %}
<!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
             <form action="" method="post">	
                <div class="box-header with-border" style="padding-bottom:0px;">
                    <a href="index.php?a=personnel.list&appoint_type=2" class="btn btn-primary">备课组组长任命列表</a>
                </div>
                <div class="box-body" style="padding-top:40px;">					
					<div class="form-group">
						  <label class="col-md-4 control-label text-right">
							   备课组组长名称：
						  </label>
						  <div class="input-group col-md-4 col-sm-12 col-xs-12">
							   <select class="form-control" name="prepare_id">
								{%foreach from=$prepare_lists key=key item=value%}
                                <option value="{%$value.prepare_id%}">{%$value.prepare_name%}</option>
                                {%/foreach%}
                              </select>   
						  </div> 
				    </div>
					<div class="form-group">
						  <label class="col-md-4 control-label text-right">
							   职务：
						  </label>
						  <div class="input-group col-md-4 col-sm-12 col-xs-12">
							   <select class="form-control" name="position_type">				
                                <option value="3">组长</option>
								<option value="4">副组长</option>  
                               </select>
						  </div> 
				    </div>
					<div class="form-group">
						  <label class="col-md-4 control-label text-right">
							   姓名：
						  </label>
						  <div class="input-group col-sm-2 " style="float:left; margin-right:8px;">
							   <input name="staff_name" id="staff_name" type="text" class="form-control" value="{%$staff_data.staff_name%}" autocomplete="off" >
								<input name="staff_id" id="staff_id" type="hidden" class="form-control" value="">
						  </div>
                          <div class="input-group col-sm-1.5">
							     <select class="form-control" name="staff_id">
								 <option value="">教师名称</option>
								 {%foreach from=$staff_lists key=key item=value%}
                                    <option value="{%$value.staff_id%}">{%$value.staff_name%}{%$value.staff_id%}</option>
                                 {%/foreach%}
                                 </select>  
						  </div> 
				    </div>
					
				</div><!--box-body --> 
                <div class="box-footer text-center">
                     <button class="btn btn-primary" type="submit">保 存 信 息</button>
                 </div>
             </form>
           </div><!--box box-default box-solid-->
        </section>   
           
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{% include file="index.footer.tpl.php" %}
<script src="static/js/run_prettify.js"></script>
<script src="static/js/jquery.mockjax.js"></script>
<script src="static/js/bootstrap-typeahead.js"></script>
<script>
		$(function() {
			function displayResult(item) {
				$("#staff_id").val(item.value);
				if(item.value > 0){
				//window.location.href="index.php?a=staff.subjectupdate&staff_id="+item.value;
				}
			}
			$('#staff_name').typeahead({
			 source: [
			{%foreach from=$staff_lists key=key item=value%}
            { id: {%$value.staff_id%}, name: '{%$value.staff_name%}' },
			{%/foreach%}
        ],

				onSelect: displayResult,
			});
		  
		});
</script>